import { useEffect, useState } from "react"


export const DemoTest = ()=> {
    const [content, updateContent] = useState('')
    useEffect(()=> { 
        console.log(content);

        return ()=> { 
            console.log(content);
        }
    }, [content])
    return <article>
        <p>demo1</p>
        <p contentEditable onInput={(e)=> { 
            updateContent(e.target.innerText)
        }}> 
        可编辑
        </p>
    </article>

}